/**
 *====================================================
 * 文件名称: BulkstockEntity.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年10月22日			chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.bulkstock.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.yuexunit.finance.bulkstock.entity.lexicon.MeasurementEnum;

/**
 * @ClassName: BulkstockEntity
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author chenxy
 * @date 2015年10月22日 下午9:29:49
 */
@Entity
@Table(name = "FIN_BULKSTOCK_INFO")
public class BulkstockInfoEntity {

	/** 大宗商品ID */
	@Id
	@GeneratedValue
	@Column(name = "BULKSTOCK_INFO_ID")
	private Long bulkstockInfoId;

	/** 大宗商品名称 */
	@Column(name = "BULKSTOCK_NAME")
	private String bulkstockName;

	/** 商品规格名称 */
	@Column(name = "SPECIFICATION_NAME")
	private String specificationName;

	/** 商品编号 */
	@Column(name = "BULKSTOCK_NUMBER")
	private String bulkstockNumber;

	/** 商品助记码 */
	@Column(name = "BULKSTOCK_HELP_CODE")
	private String bulkstockHelpCode;

	/** 计量类型 0:未知/1:体积/2:重量 */
	@Column(name = "MEASUREMENT")
	private MeasurementEnum measurement;

	/** 换算系数 */
	@Column(name = "CONVERSION_FACTOR")
	private BigDecimal conversionFactor;

	/** 大宗商品类型ID */
	@Column(name = "BULKSTOCK_CATEGORY_ID")
	private Long bulkstockCategoryId;

	/** 类别名称 */
	@Column(name = "CATEGORY_NAME")
	private String categoryName;

	/** 是否删除 */
	@Column(name = "ENABLED")
	private Boolean enabled;
	
	/** 是否启用 */
	@Column(name = "ACTIVE_STATE")
	private Boolean activeState;

	/** 创建时间 */
	@Column(name = "CREATE_DT")
	private Date createDatetime;

	/** 更新时间 */
	@Column(name = "UPDATE_DT")
	private Date updateDatetime;
	
	/** 商品等级 */
	@Column(name = "BULKSTOCK_GRADE")
	private String bulkstockGrade;
	
	/** 毛重 */
	@Column(name = "GROSS_WEIGHT")
	private BigDecimal grossWeight;
	
	/** 净重 */
	@Column(name = "NET_WEIGHT")
	private BigDecimal netWeight;
	
	/** 体积 */
	@Column(name = "VOLUME")
	private BigDecimal volume;
	

	/** 毛重 */
	@Column(name = "PRICE")
	private BigDecimal price;
	
	/** 产地 */
	@Column(name = "ORIGINAL_PLACE")
	private String originalPlace;
	
	/** 计数单位 */
	@Column(name = "COUNTING_UNIT")
	private String countingUnit;
	
	/** 换算单位 */
	@Column(name = "REDUCED_UNIT")
	private String reducedUnit;
	
	/** 换算关系 */
	@Column(name = "CONVERSION_RELATION")
	private String conversionRelation;

	public BigDecimal getPrice() {
		if (price == null) {
			price = BigDecimal.ZERO;
		}
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public String getBulkstockGrade() {
		return bulkstockGrade;
	}

	public void setBulkstockGrade(String bulkstockGrade) {
		this.bulkstockGrade = bulkstockGrade;
	}

	public BigDecimal getGrossWeight() {
		return grossWeight;
	}

	public void setGrossWeight(BigDecimal grossWeight) {
		this.grossWeight = grossWeight;
	}

	public BigDecimal getNetWeight() {
		return netWeight;
	}

	public void setNetWeight(BigDecimal netWeight) {
		this.netWeight = netWeight;
	}

	public BigDecimal getVolume() {
		if (volume == null) {
			volume = BigDecimal.ZERO;
		}
		return volume;
	}

	public void setVolume(BigDecimal volume) {
		this.volume = volume;
	}

	public String getOriginalPlace() {
		return originalPlace;
	}

	public void setOriginalPlace(String originalPlace) {
		this.originalPlace = originalPlace;
	}

	public String getCountingUnit() {
		return countingUnit;
	}

	public void setCountingUnit(String countingUnit) {
		this.countingUnit = countingUnit;
	}

	public String getReducedUnit() {
		return reducedUnit;
	}

	public void setReducedUnit(String reducedUnit) {
		this.reducedUnit = reducedUnit;
	}

	public String getConversionRelation() {
		return conversionRelation;
	}

	public void setConversionRelation(String conversionRelation) {
		this.conversionRelation = conversionRelation;
	}

	public Boolean getActiveState() {
		return activeState;
	}

	public void setActiveState(Boolean activeState) {
		this.activeState = activeState;
	}

	public Long getBulkstockInfoId() {
		return bulkstockInfoId;
	}

	public void setBulkstockInfoId(Long bulkstockInfoId) {
		this.bulkstockInfoId = bulkstockInfoId;
	}

	public String getBulkstockName() {
		return bulkstockName;
	}

	public void setBulkstockName(String bulkstockName) {
		this.bulkstockName = bulkstockName;
	}

	public Long getBulkstockCategoryId() {
		return bulkstockCategoryId;
	}

	public void setBulkstockCategoryId(Long bulkstockCategoryId) {
		this.bulkstockCategoryId = bulkstockCategoryId;
	}

	public Boolean getEnabled() {
		return enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	public Date getCreateDatetime() {
		return createDatetime;
	}

	public void setCreateDatetime(Date createDatetime) {
		this.createDatetime = createDatetime;
	}

	public Date getUpdateDatetime() {
		return updateDatetime;
	}

	public void setUpdateDatetime(Date updateDatetime) {
		this.updateDatetime = updateDatetime;
	}

	public MeasurementEnum getMeasurement() {
		return measurement;
	}

	public void setMeasurement(MeasurementEnum measurement) {
		this.measurement = measurement;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getSpecificationName() {
		return specificationName;
	}

	public void setSpecificationName(String specificationName) {
		this.specificationName = specificationName;
	}

	public BigDecimal getConversionFactor() {
		return conversionFactor;
	}

	public void setConversionFactor(BigDecimal conversionFactor) {
		this.conversionFactor = conversionFactor;
	}

	public String getBulkstockNumber() {
		return bulkstockNumber;
	}

	public void setBulkstockNumber(String bulkstockNumber) {
		this.bulkstockNumber = bulkstockNumber;
	}

	public String getBulkstockHelpCode() {
		return bulkstockHelpCode;
	}

	public void setBulkstockHelpCode(String bulkstockHelpCode) {
		this.bulkstockHelpCode = bulkstockHelpCode;
	}

}
